import axios from "axios";
export default function (callback,relGroup) {
//  let url = "http://test.mall.yn.weilian.cn/resourceLevel/resourceLevelList";
	let url =  window.api.config_host+'/resourceConfig/resource/slide_pic';
    let params = {storeCode: localStorage.getItem("storeCode"),relGroup:relGroup}
    let options = {
        method: "get",
        url,
        params,
        headers: {sessionId: getCookie("sessionId")}
    }
    axios(options).then(data => {
        if (data.status === 200 && data.data.returnCode === 1 && data.data.data) {
            console.log(data.data.data,"*****")
            callback && callback(data.data.data);
            //发布事件
            console.log("PSEvent", PSEvent);
            //三列横滑图片组件
            PSEvent.trigger("slidePicUpdate",{
                componentName: "activitiesSlidePic",
                id: relGroup
            });
        } else {
            console.log("请求接口失败");
        }
        
    }).catch(err => {
        console.log(err);
    });
}